#ifndef _UTILITY_H_

#define _UTILITY_H_

#include <stdio.h>

// list should be a pointer to a list, the size of which
// is exactly the number of all printable characters in
// ASCII (95). Return 1 if succeeded.
int GetFreqencyListFromSampleFile(FILE *fp, int *list);

// Return 1 if succeeded, zero otherwise.
int WriteFrequencyListToFile(FILE *fp, int *list);

// Return 1 if succeeded, zero otherwise.
int ReadFreqencyListFromFile(FILE *fp, int *list);

// clear symbols in fp_in that have zero freqency in the
// freqency list, write the result to fp_out and print all
// symbols that have been deleted.
void ClearZeroFreqencySymbols(int *list, FILE *fp_in, FILE *fp_out);

#endif
